<?xml version='1.0' encoding='UTF-8' ?>
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
	xmlns:tags="http://tags.com/facelets">	
		
		<tags:modal title="#{title}" >  
			
			
			<ui:define name="content">		
				
  							
		        <ui:insert name="content" />
		        
			</ui:define>	 
			<ui:define name="buttonBar">		
								
    			<tags:button   
    			 	id="btnSave"   			
					value="fw.btn.save"
					tooltip="fw.btn.save.tooltip"	
	    			mb="#{mb}" action="save" 
	    			process="@form"	update=":listForm:divTable" 
	    			onclick="if (!args.validationFailed) { closeModal('myModal')} else{ errorMessage('Erro ao salvar dados!');}"
	    			onevent="onSaveComplete"
	    			styleClass="btn-success"  />	
	    				    		
    			<tags:button 
    			 	id="btnSavePlus"   
					value="fw.btn.savePlus"
					tooltip="fw.btn.savePlus.tooltip"	
	    			mb="#{mb}" action="savePlus" 
	    			process="@form"	update="formEdit" 
	    			rendered="#{mb.mode eq 'NEW'}"	    			
	    			onclick="if (args.validationFailed) {errorMessage('Erro ao salvar dados!');}"
	    			onevent="onSaveComplete"
	    			styleClass="btn-primary"  />	
	    			    		
    			<tags:buttonJS id="btnCancel" 
					value="fw.btn.cancel"
					tooltip="fw.btn.cancel.tooltip"					
	    			onclick="closeModal('myModal')"
	    			styleClass="btn-danger"  />						
	           	
			</ui:define>
		</tags:modal>	   
</ui:composition>